<!--<?php
print <<<EOT
-->
	<div id="main">
<script>
jQuery(function(){
	var tab, li, div, housetype, timer;
	tab=jQuery("#SH-search");
	if(!tab[0])return;
	li = tab.find("ul.tab-holder li");
	div = tab.find(".tab-panel");
	hosuetype = jQuery("#J_houseType");

	li.each(function(i){
		jQuery(this).attr("index",i)
	})
	
	li.click(function(){
		var jQuerythis=jQuery(this);
		timer = setTimeout(function(){tab_change(jQuerythis,div)},100);
		return false;
	},function(){
		clearTimeout(timer);
	})


function tab_change (tager,div) {
	var index = tager.attr("index");
	var val = tager.attr("val");
	tager.siblings().removeClass("current").end().addClass("current");
	div.addClass("hidden").eq(index).removeClass("hidden");
	hosuetype.val(val);
}

})
</script>

		<div class="cc mb10">
			<div class="fl w-715">
				<div id="SH-search">
					<ul class="SH-search-tab tab-holder">
						<li class="current" val="sale"><a href="#"><i class="icon-sale"></i>找二手房</a></li>
						<li val="hire"><a href="#"><i class="icon-rent"></i>找租房</a></li>
					</ul>
					<div class="SH-search-con">
						<div class="l"></div>
						<div class="wrap">
							<div class="cc">
							<form action="{$_viewer->baseUrl}" method="post" onsubmit="if(getObj('q').value=='请输入房源特征，地点或小区名') getObj('q').value=''; return true;">
								<div class="select-box">
									<input type="hidden" value="" name="options" />
									<span>区域</span>
									<ul>
										<li val="">区域</li>
<!--
EOT;
foreach($_viewer->area as $key=>$value){
print <<<EOT
-->
										<li val="opt.areatype.{$key}" $sel>{$value}</li>
<!--
EOT;
}
print <<<EOT
-->
									</ul>
								</div>
								<input type="text" id="q" name="keywords" value="请输入房源特征，地点或小区名" />
								<input id="J_houseType" type="hidden" value="sale" name="q" />
								<button type="submit" id="q-btn">找房子</button>
							</form>
							</div>
							<div class="tab-panel">
							<ul id="query-list" class="cc">
								<li><em>从售价开始：</em>
<!--
EOT;
foreach($_viewer->sellprice as $key=>$value){
print <<<EOT
-->
								<a href="{$_viewer->secondSaleUrl}&options=opt.pricetype.{$key}">$value</a>
<!--
EOT;
}
print <<<EOT
-->
								</li>
								<li><em>从面积开始：</em>
<!--
EOT;
foreach($_viewer->acreage as $key=>$value){
print <<<EOT
-->
								<a href="{$_viewer->secondSaleUrl}&options=opt.acreagetype.{$key}">$value</a>
<!--
EOT;
}
print <<<EOT
-->
								</li>
								<li><a href="{$_viewer->secondSaleUrl}">更多找房条件>></a></li>
							</ul>
							</div>
							<div class="tab-panel hidden">
							<ul id="query-list" class="cc">
								<li><em>从租金开始：</em>
<!--
EOT;
foreach($_viewer->hireprice as $key=>$value){
print <<<EOT
-->
								<a href="{$_viewer->secondHireUrl}&options=opt.pricetype.{$key}">$value</a>
<!--
EOT;
}
print <<<EOT
-->
								</li>
								<li><em>从房型开始：</em>
<!--
EOT;
foreach($_viewer->room as $key=>$value){
print <<<EOT
-->
								<a href="{$_viewer->secondHireUrl}&options=opt.roomtype.{$key}">$value</a>
<!--
EOT;
}
print <<<EOT
-->
								</li>
								<li><a href="{$_viewer->secondHireUrl}">更多找房条件>></a></li>
							</ul>
							</div>
						</div>
						<div class="r"></div>
					</div>
				</div>
				<div class="pw-hbox mb10">
					<div class="hd">
						<div class="view-hover" altname="S6310housesale" channelid="housesale"><h3>急售房源</h3>
</div>
						<a class="more" href="{$_viewer->secondSaleUrl}&act=urgent">更多>></a>
					</div>
					<div class="bd">
						<div class="list-wrap">
							<div class="view-hover" altname="V1334housesale" channelid="housesale">						
							<ul class="pw-hlist pw-htable">
EOT;
$pwresult = pwTplGetData('V1334housesale','房源列表');
foreach($pwresult as $key=>$val){print <<<EOT
<li><a href="$val[url]"><span class="house-name">$val[village]</span><span class="house-type">$val[room]</span><span class="area">$val[acreage]平米</span><span class="price">$val[price]万</span></a></li>
EOT;
}print <<<EOT
</ul>

						

</div>
						</div>
					</div>
				</div>
				<div class="pw-hbox mb10">
					<div class="hd">
						<div class="view-hover" altname="F4476housesale" channelid="housesale"><h3>急租房源</h3>
</div>
						<a class="more" href="{$_viewer->secondHireUrl}&act=urgent">更多>></a>
					</div>
					<div class="bd">
						<div class="list-wrap">
							<div class="view-hover" altname="W8349housesale" channelid="housesale">	<ul class="pw-hlist pw-htable">
EOT;
$pwresult = pwTplGetData('W8349housesale','房源列表');
foreach($pwresult as $key=>$val){print <<<EOT
<li><a href="$val[url]"><span class="house-name">$val[village]</span><span class="house-type">$val[room]</span><span class="area">$val[acreage]平米</span><span class="price">$val[price]元/月</span></a></li>
EOT;
}print <<<EOT
</ul>
	

</div>
						</div>
					</div>
				</div>
				<div class="ad-w715 mb10">
					<!-- 广告位 start -->
<!--
EOT;
list($htmlAdvert,$arrAdvert) = pwAdvert('Mode.House.Second.Center','','','');
if($htmlAdvert){
print <<<EOT
-->

				<div class="mb">$htmlAdvert</div>
<!--
EOT;
}print <<<EOT
-->
<!-- 广告位 end -->
				</div>
				<div class="pw-hbox broker-box mb10">
					<div class="hd">
						<div class="view-hover" altname="W4082housesale" channelid="housesale"><h3>推荐经纪人</h3>
</div>
					</div>
					<div class="bd">
						<div class="list-wrap">
						<div class="view-hover" altname="Q4760housesale" channelid="housesale">							<ul class="broker-list">
EOT;
$pwresult = pwTplGetData('Q4760housesale','经纪人列表');
foreach($pwresult as $key=>$val){print <<<EOT
<li class="item">
									<div class="pho">
										<a href="$val[url]"><img src="$val[image]" width="90" height="90" /></a>
									</div>
									<h3><a href="$val[url]">$val[realname]</a> $val[online]</h3>
									<ul class="attr">
										<li>联系电话：$val[tel]</li>
										<li>服务商圈：$val[plate]</li>
									</ul>
									
									<p class="data"><span class="sale"><i title="出售" class="icon">出售</i><a href="$val[url]&a=sale">$val[salenum]套</a></span><span class="rent"><i title="出租" class="icon">出租</i><a href="$val[url]&a=hire">$val[hirenum]套</a></span></p>
								</li>
EOT;
}print <<<EOT
</ul>
						

</div>
						</div>
					</div>
				</div>
			</div>
			
			<div class="fr w-235">
				<div class="btns">
					<p><a class="SH-btn SH-btn-putout" href="{$_viewer->addSaleUrl}"><i class="sale"></i>发布出售</a>
					<a class="SH-btn SH-btn-putout" href="{$_viewer->addHireUrl}"><i class="rent"></i>发布出租</a></p>
					<p><a class="SH-btn" href="{$_viewer->checkinUrl}"><i class="broker"></i>开通经纪人</a>
					<a class="SH-btn" href="{$_viewer->manageUrl}"><i class="manage"></i>房源管理</a></p>
				</div>
				<div class="house-tools index-tools-box mb10">
					<div class="hd">
						<h3>实用工具</h3>
					</div>
					<div class="bd">
						<div class="tools-unit tools-buy">
							<h4>购房</h4>
							<div class="view-hover" altname="J6953housesale" channelid="housesale">							<ul class="pw-hlist">
								<li class="l"><a href="#">二手房交易流程</a></li>
								<li class="r"><a href="index.php?m=house&q=calculate&housetype=sale">房贷计算器</a></li>
								<li class="l"><a href="#">二手房买卖合同</a></li>
								<li class="r"><a href="#">购房宝典</a></li>
							</ul>
							
</div>
						</div>
						<div class="tools-unit">
							<h4>租房</h4>
							<div class="view-hover" altname="U3899housesale" channelid="housesale">	<ul class="pw-hlist">
		<li class="l"><a href="#">租房交易流程</a></li>
		<li class="r"><a style="color:#f00;" href="index.php?m=house&amp;q=hire&amp;a=agent">中介鉴别</a></li>
		<li class="l"><a href="#">租房合同范本</a></li>
		<li class="r"><a href="#">租房故事</a></li>
	</ul>
	

</div>
						</div>
					</div>
				</div>
				
				<div class="house-tools mb10">
					<div class="hd">
						<div class="view-hover" altname="M2434housesale" channelid="housesale"><h3>二手房问答</h3>
</div>
					</div>
					<div class="bd">
					<div class="view-hover" altname="R2999housesale" channelid="housesale">	<ol class="pw-hlist">
EOT;
$pwresult = pwTplGetData('R2999housesale','二手房问答');
foreach($pwresult as $key=>$val){print <<<EOT
<li><a href="$val[url]">$val[title]</a></li>
EOT;
}print <<<EOT
</ol>
					

</div>
					</div>
				</div>
				
				<div class="house-tools mb10">
					<div class="hd">
						<div class="view-hover" altname="R6522housesale" channelid="housesale"><h3>二手房小知识</h3>
</div>
					</div>
					<div class="bd">
					<div class="view-hover" altname="V369housesale" channelid="housesale">	<ol class="pw-hlist">
EOT;
$pwresult = pwTplGetData('V369housesale','二手房小知识');
foreach($pwresult as $key=>$val){print <<<EOT
<li><a href="$val[url]">$val[title]</a></li>
EOT;
}print <<<EOT
</ol>
					

</div>
					</div>
				</div>
				
				<div class="ad-w235">
				<!--
EOT;
list($htmlAdvert,$arrAdvert) = pwAdvert('Mode.House.Second.Left','','','');
if($htmlAdvert){
print <<<EOT
-->

				<div class="mb">$htmlAdvert</div>
<!--
EOT;
}print <<<EOT
-->
<!-- 广告位 end -->
				
				</div>
			</div>
		</div>
<!--
EOT;
?>-->